package de.staxx6.bomber;

import com.jme3.app.Application;
import com.jme3.app.SimpleApplication;
import com.jme3.app.state.AbstractAppState;
import com.jme3.app.state.AppStateManager;
import com.jme3.asset.AssetManager;
import com.jme3.math.ColorRGBA;
import com.jme3.renderer.ViewPort;
import com.jme3.scene.Node;

public class SetupState extends AbstractAppState {
	
	private ViewPort viewPort;
	private Node rootNode;
	private Node guiNode;
	private AssetManager assetManager;
	private Node localRootNode = new Node("Start Screen RootNode");
	private Node localGuiNode = new Node("Start Screen GuiNode");
	private ColorRGBA backgroundColor = ColorRGBA.Gray;
	
	public SetupState(SimpleApplication app) {
		this.rootNode = app.getRootNode();
		this.viewPort = app.getViewPort();
		this.guiNode = app.getGuiNode();
		this.assetManager = app.getAssetManager();
		
		System.out.println("SetupState!");
	}
	
	public void initialize(AppStateManager stateManager, Application app) {
		super.initialize(stateManager, app);
	}
	
	public void update(float delta) {
		
	}
	
	public void stateAttached(AppStateManager stateManger) {
		rootNode.attachChild(localRootNode);
		guiNode.attachChild(localGuiNode);
	}
	
	public void stateDetached(AppStateManager stateManager) {
		rootNode.detachChild(localRootNode);
		guiNode.detachChild(localGuiNode);
	}

}
